<template>
  <div id="main">
    <div class="top-box">
      <img @touchstart="goback" class="left-arrow" src="@/assets/书城/shape_u112.png" alt />
      <span>扫一扫</span>
      <div></div>
    </div>
    <div id="mask">
      <div class="qrbox" @touchstart="qrcodeshow">
        <img
          v-show="isshow"
          class="qrimg"
          width="162"
          height="162"
          src="@/assets/tabbar/u4119.png"
          alt
        />
        <img class="line" src="@/assets/tabbar/u4120.png" alt />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      isshow: false
    };
  },
  methods: {
    qrcodeshow() {
      this.isshow = true;
      if(this.isshow){
        setTimeout(function(){
            this.isshow=false
        },1500)
      }
    }
    ,goback(){
      this.$router.go(-1)
    }
  }
};
</script>

<style lang="less" scoped>
#main {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  .top-box {
    box-sizing: border-box;
    width: 100%;
    height: 1.6rem;
    display: flex;
    justify-content: space-between;
    background-color: rgba(255, 255, 255, 1);
    padding: 0 1.5rem;
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
    height: 5rem;
    .left-arrow {
      width: .9rem;
      height: 1.4rem;
    }
    span {
      font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC";
      font-weight: 650;
      font-style: normal;
      font-size: 1.8rem;
    }
  }
  #mask {
    height: 73.4rem;
    background: inherit;
    background-color: rgba(51, 51, 51, 1);
    position: relative;
    .qrbox {
      box-sizing: border-box;
      width: 17.7rem;
      height: 17.7rem;
      position: absolute;
      padding: 1.5rem;
      background: inherit;
      background-color: rgba(204, 204, 204, 1);
      left: 50%;
      transform: translate(-50%);
      top: 30%;
      .qrimg {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
      }
      .line {
        position: absolute;
        top: -1.3rem;
        left: 50%;
        transform: translate(-50%);
        animation: myline 1.8s infinite linear;
      }
      @keyframes myline {
        0% {
          top: -1.3rem;
        }
        100% {
          top: 16.6rem;
        }
      }
    }
  }
}
</style>